﻿using System.Linq.Expressions;
using CoreEx.Database.Linq.Translators;
using CoreEx.Database.Query.Expressions;
using LinFu.IoC.Configuration;
using System.Reflection;
using System;
using System.Collections.Generic;
using LinFu.IoC.Interfaces;


namespace CoreEx.Database.Linq
{
    /// <summary>
    /// Represents a class that is capable of translating a <see cref="Expression"/> 
    /// instance into a <see cref="TranslateResult"/> instance.
    /// </summary>
    public interface IQueryTranslator
    {
        /// <summary>
        /// Translates the <paramref name="expression"/> into a <see cref="TranslateResult"/> instance.
        /// </summary>
        /// <param name="expression">The <see cref="Expression"/> to translate.</param>
        /// <returns>A <see cref="TranslateResult"/> instance that represents the translated <paramref name="expression"/></returns>
        TranslateResult Translate(Expression expression);


        TranslateResult Translate(MethodCallExpression methodCallExpression, MappedProperty outerMappedProperty);
    }



}
